

<%@ page import="org.tailor.Orders" %>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="layout" content="main" />
  <g:set var="entityName" value="${message(code: 'orders.label', default: 'Orders')}" />
  <title><g:message code="default.create.label" args="[entityName]" /></title>
</head>
<body>
  <div class="nav">
    <span class="menuButton"><a class="home" href="${createLink(uri: '/')}"><g:message code="default.home.label"/></a></span>
    <span class="menuButton"><g:link class="list" action="list"><g:message code="default.list.label" args="[entityName]" /></g:link></span>
  </div>
  <div class="body">
    <h1><g:message code="default.create.label" args="[entityName]" /></h1>
    <g:if test="${flash.message}">
      <div class="message">${flash.message}</div>
    </g:if>
    <g:hasErrors bean="${ordersInstance}">
      <div class="errors">
        <g:renderErrors bean="${ordersInstance}" as="list" />
      </div>
    </g:hasErrors>
    <g:form action="save" >
      <div class="dialog">
        <table>
          <tbody>
            <tr class="prop">
              <td valign="top" class="name">
                <label for="transactionIdTrans"><g:message code="orders.transactionIdTrans.label" default="Transaction Id Trans" /></label>
              </td>
              <td valign="top" class="value ${hasErrors(bean: ordersInstance, field: 'transactionIdTrans', 'errors')}">
          <g:select name="transactionIdTrans.id" from="${org.tailor.Trans.list()}" optionKey="id" value="${ordersInstance?.transactionIdTrans?.id}"  />
          </td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="shirtIdShirt"><g:message code="orders.shirtIdShirt.label" default="Shirt Id Shirt" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: ordersInstance, field: 'shirtIdShirt', 'errors')}">
          <g:select name="shirtIdShirt.id" from="${org.tailor.Shirt.list()}" optionKey="id" value="${ordersInstance?.shirtIdShirt?.id}"  />
          </td>
          </tr>
          <tr class="prop">
            <td valign="top" class="name">
              <label for="requiredDate"><g:message code="orders.requiredDate.label" default="Required Date" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: ordersInstance, field: 'requiredDate', 'errors')}">
          <g:datePicker name="requiredDate" precision="day" value="${ordersInstance?.requiredDate}"  />
          </td>
          </tr>



          <tr class="prop">
            <td valign="top" class="name">
              <label for="unit"><g:message code="orders.unit.label" default="Unit" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: ordersInstance, field: 'unit', 'errors')}">
          <g:textField name="unit" value="${fieldValue(bean: ordersInstance, field: 'unit')}" />
          </td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="price"><g:message code="orders.price.label" default="Price" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: ordersInstance, field: 'price', 'errors')}">
          <g:textField name="price" value="${fieldValue(bean: ordersInstance, field: 'price')}" />
          </td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="discount"><g:message code="orders.discount.label" default="Discount" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: ordersInstance, field: 'discount', 'errors')}">
          <g:textField name="discount" value="${fieldValue(bean: ordersInstance, field: 'discount')}" />
          </td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="salesTax"><g:message code="orders.salesTax.label" default="Sales Tax" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: ordersInstance, field: 'salesTax', 'errors')}">
          <g:textField name="salesTax" value="${fieldValue(bean: ordersInstance, field: 'salesTax')}" />
          </td>
          </tr>

          <tr class="prop">
            <td valign="top" class="name">
              <label for="status"><g:message code="orders.status.label" default="Status" /></label>
            </td>
            <td valign="top" class="value ${hasErrors(bean: ordersInstance, field: 'status', 'errors')}">
          <g:select name="status" from="${ordersInstance.constraints.status.inList}" value="${ordersInstance?.status}" valueMessagePrefix="orders.status"  />
          </td>
          </tr>

          </tbody>
        </table>
      </div>
      <div class="buttons">
        <span class="button"><g:submitButton name="create" class="save" value="${message(code: 'default.button.create.label', default: 'Create')}" /></span>
      </div>
    </g:form>
  </div>
</body>
</html>
